package zhr.chapter12;

public class Consumer extends Thread {
    private int consumeNum;
    private BreadContainer bc;

    public Consumer(int consumeNum, BreadContainer bc, String consumerName) {
        this.consumeNum = consumeNum;
        this.bc = bc;
        this.setName(consumerName);
    }

    public Consumer() {
    }

    public void run() {
        bc.consumeBread(consumeNum, this.getName());
    }
}
